import { Route, Redirect } from "react-router-dom";
import { isAuth } from "../../helpers/auth";

export default function PrivateUser({component:Component, ...reset}) {
        return <Route {...reset} render={props => {
            if (isAuth()) {
                return <Component {...props} />
            }
            return <Redirect to='/signin' />
        }} />
}